﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace Hired
{
    public partial class yourprofile : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // do authentication code to redirect to jsprofile or empprofile
            if (User.IsInRole("admin"))
            {
                Response.Redirect("admin/home.aspx");
            }
            else if (User.IsInRole("employer"))
            {
                Server.Transfer("empprofile.aspx");
            }
            else if (User.IsInRole("jobseeker"))
            {
                Server.Transfer("jsprofile.aspx");
            }
            else if (User.IsInRole("company")) 
            {
                Server.Transfer("empprofile.aspx");
            }
            
            {
                Response.Redirect("home.aspx");
            }
        }
    }
}